<template>
    <p>初始化message: {{ message }}</p>
    <p>反转之后的message:  {{ reversedMesage }}</p>
    <button @click="updateMessage">更改</button>
</template>

<script setup>
import { ref, computed } from 'vue'
const message = ref('hello world')
const reversedMesage = computed(() => {
    return message.value.split('').reverse().join('')
})
const updateMessage = () => {
    message.value = 'hello vue'
}
</script>